home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950929-19951130 / 000359_news@columbia.edu_Fri Nov 10 19:54:11 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA19689
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun>); Sat, 11 Nov 1995 08:22:40 -0500
  3. Received: (from news@localhost) by apakabar.cc.columbia.edu (8.6.12/8.6.12) id IAA13829 for kermit.misc@watsun; Sat, 11 Nov 1995 08:22:38 -0500
  4. Path: news.columbia.edu!panix!bloom-beacon.mit.edu!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!in2.uu.net!usc!cs.utexas.edu!utnut!torn!news.ccs.queensu.ca!news.ccs.queensu.ca!not-for-mail
  5. From: mike@ccs.queensu.ca (Mike Smith)
  6. Newsgroups: comp.protocols.kermit.misc
  7. Subject: Re: Dectecting winsock - How?
  8. Date: 10 Nov 1995 14:54:11 -0500
  9. Organization: Queen's University, Kingston
  10. Lines: 47
  11. Sender: mike@knot.QueensU.CA
  12. Message-Id: <480al3$4hm@ccs-sparc2.queensu.ca>
  13. References: <1995Nov9.171003.1@vax.sbu.ac.uk>
  14. Nntp-Posting-Host: ccs-sparc2.ccs
  15. To: higginha@vax.sbu.ac.uk
  16.  
  17.  
  18. In article <1995Nov9.171003.1@vax.sbu.ac.uk>, higginha@vax.sbu.ac.uk writes:
  19. |> Hi out there in the info-pool
  20. |> 
  21. |> Just a quickie here:
  22. |>   I'm using kermit under windows and would like to detect
  23. |> whether Trumpet winsock is loaded, if it is, display some
  24. |> error message then exit Kermit.  If it is not then Kermit
  25. |> can continues and makes its connection to the remote host.
  26. |> Any suggestions greatly appreciated.
  27. |> 
  28. |> Thanks in advance.     - Tony -
  29. |> 
  30.  
  31. I don't believe there is any way to detect that Winsock is running.
  32. However, if you *know* you are on an ethernet connection you can test
  33. for failure after your script executes "connect" and then issue a warning
  34. message asking if Winsock is implicated.  That, at least, was how I
  35. did it here.  Below are a couple macros defined in our local customizations.
  36. \m(qcon) is a local macro indicating the type of connection: ethernet, dial-in,
  37. or pacx.  You'd have to replace that test with something of your own.
  38. The login script does a set port tcp <whatever> and then
  39.  
  40.    connect
  41.    if failure wswarn
  42.  
  43. ; Emsg reports an error message with a beep and then sleeps 10 seconds
  44. ; to let Windows users read the message before exiting.
  45. def emsg -
  46.    echo {\7\%1}, -
  47.    if > argc 1 echo {}, -
  48.    echo {...MS-Kermit will exit in 10 seconds or sooner if you press any key...}, -
  49.    sleep 10, -
  50.    exit
  51. ; wswarn warns that Kermit cannot be used on an ethernet connection if
  52. ; Winsock is running.  On other connections wswarn is a no-op.
  53. def wswarn -
  54.    if not eq \m(qcon) ethernet end, -
  55.    echo {}, -
  56.    echo {Warning: MS-Kermit could not establish a network connection.  If you are in}, -
  57.    emsg {Windows, make sure that Trumpet Winsock is *closed*, not just minimized.}, -
  58.    end 1
  59. -- 
  60.  
  61.  Mike Smith                                  mike@ccs.queensu.ca
  62.  Queen's University                          Michael.D.Smith@QueensU.CA
  63.  Computing and Communications Services       (613) 545-2024